package org.zhaijisong.pojo;

public class StaffRole {
    private Integer id;
    private Integer roleId;
    private Integer staffId;
    private Role role;

    public Role getRole() {
        return role;
    }

    public void setRole(Role role) {
        this.role = role;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getRoleId() {
        return roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    public Integer getStaffId() {
        return staffId;
    }

    public void setStaffId(Integer staffId) {
        this.staffId = staffId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        StaffRole staffRole = (StaffRole) o;

        if (id != null ? !id.equals(staffRole.id) : staffRole.id != null) return false;
        if (roleId != null ? !roleId.equals(staffRole.roleId) : staffRole.roleId != null) return false;
        if (staffId != null ? !staffId.equals(staffRole.staffId) : staffRole.staffId != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (roleId != null ? roleId.hashCode() : 0);
        result = 31 * result + (staffId != null ? staffId.hashCode() : 0);
        return result;
    }
}
